package com.gurumades.jsonform.server.forms.dispatch;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;

import com.gurumades.jsonform.shared.dispatch.validators.FormItemValidator;


public abstract class FormPreprocessHelp {
	public boolean formIsBuilding;
	protected long buildID;
	
	
	public void setBuildID(long nextLong) {
		this.buildID = nextLong;
	}
	
	public long getBuildID() {
		return buildID;
	}
	
	public boolean isFormIsBuilding() {
		return formIsBuilding;
	}
	
	public void setFormIsBuilding(boolean formIsBuilding) {
		this.formIsBuilding = formIsBuilding;
	}
	
	public abstract void addSubmitHandler(FormSubmiter fs);
	
	public abstract Set<FormSubmiter> getSubmiters();

	abstract void addFormValidator(FormValidator fs);

	public abstract void addFormItemValidator(String itemID, FormItemValidator fs);
	
	public abstract Set<FormItemValidator> getItemValidators(String itemID);
	
	public abstract Collection<String> getItemValidators();
	
	public abstract Set<FormValidator> getFormValidators();
	
	public abstract void setBuildParams(HashMap<String, Serializable> buildParams);
	
	public abstract HashMap<String, Serializable> getBuildParams();
}
